import React, { Fragment } from "react";
import { PageHeader, Button, Descriptions } from "antd";
import MenuCss from "../index.module.css";

export default function MenuHeader(props) {
  const { changeModalState } = props;
  /* 修改弹窗状态 */
  const openFormModal = () => {
    changeModalState();
  };
  return (
    <Fragment>
      <PageHeader
        className={MenuCss.menu_page_header}
        onBack={() => window.history.back()}
        title="菜单管理"
        extra={[
          <Button key="3" type="primary" onClick={openFormModal}>
            新建
          </Button>,
          <Button key="2" type="primary">
            删除
          </Button>,
        ]}
      >
        <Descriptions size="small" column={3}>
          <Descriptions.Item label="Created">Lili Qu</Descriptions.Item>
          <Descriptions.Item label="Association">421421</Descriptions.Item>
          <Descriptions.Item label="Creation Time">2017-01-10</Descriptions.Item>
        </Descriptions>
      </PageHeader>
    </Fragment>
  );
}
